package example.com.zyfypt_618zgm.model;


import java.util.List;

import example.com.zyfypt_618zgm.bean.ModBean;
import example.com.zyfypt_618zgm.iface.ListUserResiface;
import example.com.zyfypt_618zgm.service.ListUserResService;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 小茗同学 on 2017/6/1.
 */

public class ListUserResModel implements ListUserResiface {
    private Retrofit retrofit;
    private String BASEURL="http://amicool.neusoft.edu.cn/";
    public ListUserResModel() {
        retrofit =new Retrofit.Builder().baseUrl(BASEURL).addConverterFactory(GsonConverterFactory.create()).build();
    }

    @Override
    public Call<List<ModBean>> getResult(String mod, int page, String sessionID, int userid){
        ListUserResService ListUserResService =retrofit.create(ListUserResService.class);
        return ListUserResService.getArticleList(mod,page,sessionID,userid);
    }
}
